import { requestType } from '~/config/enum.config'

const SERVICE = 'management-service'
const CONTROLLER = 'departmentController'

export default {
  /**
   * 获取本级及以下机构
   */
  querySubDepartment: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'querySubDepartment',
    type: requestType.Get
  },
  // 获取全部的机构
  queryAllDepartment: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'queryAllDepartment',
    type: requestType.Get
  },
  // 获取全部的机构(不做权限控制)
  getAllDepartment: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'getAllDepartment',
    type: requestType.Get
  },
  /**
   * 移动组织机构
   */
  moveDepartment: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'moveDepartment',
    type: requestType.Get
  },
  /**
   * 删除部门
   */
  deleteDepartment: {
    service: SERVICE,
    controller: CONTROLLER,
    action: '',
    type: requestType.Delete
  },
  /**
   * 修改部门
   */
  updateDepartment: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'updateDepartment',
    type: requestType.Put
  },
  /**
   * 增加部门
   */
  createDepartment: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'createDepartment',
    type: requestType.Post
  },
  /**
   * 绩效删除
   */
  deletePerformanceDetailById: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'deletePerformanceDetailById',
    type: requestType.Get
  },

  // 根据用户获取用户所在机构集合（案件转派使用）
  queryDepartmentByUserIds: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'queryDepartmentByUserIds',
    type: requestType.Get
  }
}
